<!-- /* Description for file.
 * 简历推荐面试页面
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/resources
 * @since         ues
 * @version       V0.0.1
 * @modifiedby   会兵2011年0709
 * @lastmodified  会兵2011年0709
 */
 -->
 <?php
echo $html->css ( 'style' );
echo $html->css ( 'tab' );
echo $javascript->link ( 'jquery' );
?>
<script language=javascript>

//项目公司类型与项目公司的关联菜单
$(document).ready(function(){
	$("#companytype").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/resumes/getcompany/",{
				Companymanage : $(this).val()
				},
			function(data,textStatus){
					 $("#company:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#company:eq(0)").append("<option></option>");
					 $("#company:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
			});
		});
		}
	});
});

//项目公司与项目职位的关联菜单
$(document).ready(function(){
	$("#company").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getrecruitposition/",{
				Recruitposition : $(this).val()
				},
			function(data,textStatus){
					 $("#recruitposition:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#recruitposition:eq(0)").append("<option></option>");
					 $("#recruitposition:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
		});
		}
	});
});

//项目职位与项目的关联菜单
$(document).ready(function(){
	$("#recruitposition").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getcompanymanage/",{
				Projectmanagement : $(this).val()
				},
			function(data,textStatus){
					 $("#projectmanagement:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
					 $("#projectmanagement:eq(0)").append("<option></option>");
					 $("#projectmanagement:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
	});
});

//机构下拉选择部门下拉
$(document).ready(function() {
	$("#organ").change(function(){
		var company = $(this).val();
		if(company!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorlists/getdepartments/",{
				Organ : $(this).val()
				},function(data,textStatus){
					 $("#department:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					 $("#department:eq(0)").append("<option></option>");
					 if($(this).text()=="不选")
					 {
						 $("#department:eq(0)>option:last").val("").html($(this).text());
					 }
					 else
					 {
						 $("#department:eq(0)>option:last").val($(this).attr('name')).html($(this).text());
					 }
				  });
				});
		}
		else
		{
			$("#department:eq(0)>option").remove();
			$("#department:eq(0)").append("<option></option>");
			$("#department:eq(0)>option:last").val("").html("不选");
		}
	});
});

//部门下拉选择用户下拉
$(document).ready(function() {
	$("#department").change(function(){
		var company = $(this).val();
		if(company!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorlists/getusers/",{
				Department : $(this).val()
				},function(data,textStatus){
					 $("#user:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					 $("#user:eq(0)").append("<option></option>");
					 if($(this).text()=="不选")
					 {
						 $("#user:eq(0)>option:last").val("").html($(this).text());
					 }
					 else
					 {
						 $("#user:eq(0)>option:last").val($(this).text()).html($(this).text());
					 }
				  });
				});
		}
		else
		{
			$("#user:eq(0)>option").remove();
			$("#user:eq(0)").append("<option></option>");
			$("#user:eq(0)>option:last").val("").html("不选");
		}
	});
});

</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Resumesmanagements');//一级目录
										   echo '>';echo __('Resumesallinfo search');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true));//简历详细信息当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<?php echo $form->create('Resume',array('action'=>'addtovisitor','type'=> 'post'));?>
<?php echo $form->hidden('id',array('value'=>$resume['Resume']['id'],'id'=>'resumeid'));?>
<div class="tabflex">
	<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
			<tr>
				<td height="20"><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumedetail/<?php echo $resume['Resume']['id'];?>">具体简历</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/mutualityresume/<?php echo $resume['Resume']['id'];?>">相关简历</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumespostils/init/<?php echo $resume['Resume']['id'];?>">简历批注</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumecommend/<?php echo $resume['Resume']['id'];?>" style="color:Red;">推荐面试</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/allinfosuitposition/<?php echo $resume['Resume']['id'];?>">适合职位</a></TD>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumefiles/<?php echo $resume['Resume']['id'];?>">简历附件</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/resumereports/<?php echo $resume['Resume']['id'];?>">简历报告</a></td>
				<td ><a href="<?php echo ROOT_WEB_PATH; ?>/resumes/viewresumecontext/<?php echo $resume['Resume']['id'];?>">查看全文</a></TD>
				<td ></td>
			</tr>
			<tr>
				<td colspan="11">简历原件：
					<?php 	if($resume['Resume']['resumefilepath']!=null&&$resume['Resume']['resumefilepath']!="")
							{
								$dir="files-resumefiles";
								echo $html->link($resume['Resume']['resumefilename'],
								'/resumes/down/'.$dir.'/'.$resume['Resume']['resumefilepath'],
								array('class'=>'view'));
							}
					?> 
			</tr>
	</table>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
  <tr>
   <td>简历ID：
		<span style="word-break:break-all;"><?php echo $resume['Resume']['id'];?></span>
</td>
</TR>
</TABLE>
<fieldset><legend><?php __('简历推荐');//简历推荐?></legend> 


<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
  <tr>
    <td width="2%"></TD>
    <td>公司类型：</TD>
    <td>
    	<?php $options = array();
					foreach($customertypes as $eachrecord)
					{
						$options[$eachrecord['Customertype']['name']] = $eachrecord['Customertype']['name'];
					}
					echo $form->input('companytype',array('empty' =>'选择企业类型','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'companytype'));		
		?>
	</TD>
    <td><span style="word-break:break-all;">公司名称：</span></TD>
    <td>
    	<?php $options = array();
					foreach($companymanagelist as $eachrecord)
					{
						$options[$eachrecord['Companymanage']['id']] = $eachrecord['Companymanage']['name'];
					}
					echo $form->input('company',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'company'));		
				?>
    </td>
    <tr>
    	<td width="2%"></TD>
    	<td>职位名称：</TD>
	    <td>
	    	<?php $options = array();
						foreach($recruitpositionlist as $eachrecord)
						{
							$options[$eachrecord['Recruitposition']['id']] = $eachrecord['Recruitposition']['name'];
						}
						echo $form->input('recruitposition',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'recruitposition'));		
					?>
	    </td>
	    <td><span style="word-break:break-all;">项目编号：</span></TD>
	    <td>
	    	<?php $options = array();
						foreach($projectmanagementlist as $eachrecord)
						{
							$options[$eachrecord['Projectmanagement']['id']] = $eachrecord['Projectmanagement']['projectCode'];
						}
						echo $form->input('projectmanagement',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'projectmanagement'));		
					?>
	    </td>
    </tr>
  <TR>
    <td width="2%"></TD>
    <TD><span id="Label1" style="word-break:break-all;">推&nbsp;荐&nbsp;人：</span></TD>
	<td colspan="3">
		<?php $options = array();
					foreach($organs as $eachrecord)
					{
						$options[$eachrecord['Organ']['id']] = $eachrecord['Organ']['name'];
					}
					echo $form->input('organ',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'organ'));		
		?>

		<?php $options = array();
					foreach($departments as $eachrecord)
					{
						$options[$eachrecord['Department']['id']] = $eachrecord['Department']['name'];
					}
					echo $form->input('department',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'department'));		
				?>

		<?php $options = array();
					foreach($users as $eachrecord)
					{
						$options[$eachrecord['User']['username']] = $eachrecord['User']['username'];
					}
					echo $form->input('user',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'user'));		
		?>
	</td>
</TR>
  <tr>
    <td width="2%"></TD>
    <td></TD>
    <td colspan="3"> 
    		<?php echo $form->button('添加到项目寻访',array('type'=>'submit','class'=>'btn7'));?>
	</TD>
</TR>
</TABLE>

</fieldset>
<fieldset><legend><?php __('简历 记录');//简历推荐?></legend> 
<table class="tab1">
			<tr>
				<th>推荐时间</th><th>推荐人</th><th>推荐公司</th><th>推荐职位</th><th>项目编号</th><th>招聘负责人</th><th>状态</th><th>是否完成</th><th>进度备注</th><th>推荐评语</th>
			</tr>
			<?php 
				foreach($candidates as $k => $v)
				{
					echo "<tr><td nowrap='nowrap'>";
					echo $v['Candidate']['nominateTime'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['User']['username'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Projectmanagement']['projectCompany'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Projectmanagement']['projectCompanyPosition'];
					echo "</td>";
					echo "<td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/initProjectManage/".$v['Candidate']['projectmanagement_id']."'>";
					echo $v['Projectmanagement']['projectCode'];
					echo "</a></td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Projectmanagement']['projectManage'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Projectmanagement']['projectStatue'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Candidate']['hasfinish'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Candidate']['memo'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Candidate']['remark'];
					echo "</td></tr>";
				}
			?>
		</table>
</fieldset> 
<fieldset><legend><?php __('项目寻访');//简历推荐?></legend> 
    <table class="tab1">
		<tr>
			<th>候选人</th><th>项目编号</th><th>添加时间</th><th>添加人</th>
		</tr>
	<?php 
				foreach($visitorrecords as $k => $v)
				{
					echo "<tr><td nowrap='nowrap'>";
					echo $v['Resume']['name'];
					echo "</td>";
					echo "<td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/initProjectManage/".$v['Projectmanagement']['id']."'>";
					echo $v['Projectmanagement']['projectCode'];
					echo "</a></td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Visitorrecord']['created'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Visitorrecord']['creater'];
					echo "</td></tr>";
				}
			?>
</table>
</fieldset>
<fieldset><legend><?php __('面试记录');//简历推荐?></legend> 
<table class="tab1">
			<tr >
				<th>项目编号</th><th>轮次</th><th>候选人</th><th>时间</th><th>地点</th><th>客户意见</th><th>备注</th><th>面试官</th><th>试卷名称</th><th>总分</td>
			</tr>
			<?php 
				foreach($result as $k => $v)
				{
					echo "<tr><td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/initProjectManage/".$v['Interviewrecord']['projectmanagement_id']."'>";
					echo $v['Projectmanagement']['projectCode'];
					echo "</a></td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewturn'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Candidate']['name'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewtime'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewaddress'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewfeedback'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['memo'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewasker'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['interviewquestionname'];
					echo "</td>";
					echo "<td nowrap='nowrap'>";
					echo $v['Interviewrecord']['score'];
					echo "</td></tr>";
				}
			?>
		</table>
</fieldset>
</div>
<?php echo $form->end();?>
